<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <ul>
            <!-- v-for遍历数组 item表示的是数组中的每一项 -->
            <li v-for="item in arr" :key="item.id">学校名字：{{item.name}} --- 学费：{{item.money}} --- 学制：{{item.time}} </li>
        </ul>
        <ul>
             <!-- v-for遍历对象 item表示的是对象的属性值，index表示的是对象的属性名 -->
            <li v-for="item,index in obj" >{{item}}--- {{index}}</li>
        </ul>
        <ul>
             <!-- v-for遍历数字 其实是遍历数字对应的次数 item是从1开始到count结束的数字，index表示的是下标 -->
            <li v-for="item,index in count" >{{item}}--{{index}}</li>
        </ul>
    </div>
    <script>
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    arr:[
                        {name:'华夏理工',money:'10000',time:'4',id:'001'},
                        {name:'武铁',money:'21000',time:'3',id:'002'},
                        {name:'武纺',money:'15000',time:'4',id:'003'},
                    ],
                    obj:{
                        name:'老王',
                        age:'34',
                        sex:'男'
                    },
                    count:8,
                }
            },
        })
    </script>
</body>

</html>